package com.itheima.test;

import com.itheima.dao.UserDao;
import org.junit.Test;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Springtest {
     @Test
    //测试scope属性
     public void test() {
         ClassPathXmlApplicationContext app = new ClassPathXmlApplicationContext("applicationContext.xml");
         UserDao userDao1 = (UserDao) app.getBean("userDao");
         UserDao userDao2 = (UserDao) app.getBean("userDao");
         System.out.println(userDao1);
         System.out.println(userDao2);
         app.close();
        }
    }

